package com.example.demo.DAO;

import com.example.demo.DO.UserDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserDAO {
    @Select("select * from user where user=#{user}")
    public List<UserDO> selectId(String user);
    @Select("select * from user")
    public List<UserDO> selectAll();
    @Insert("insert into user value (#{user},#{password})")
    public int insert(String user,String password);
    @Delete("delete from user where user=#{user}")
    public int delete(String user);
}
